package com.CST.mapper.cst.cb;

import com.CST.dto.cb.DateDTO;
import com.CST.dto.cb.InSourceDTO;
import com.CST.entity.cb.CostDataInfo;
import com.CST.entity.cb.EtlAccount;
import com.CST.entity.cb.EtlAccvouch;
import com.CST.vo.cb.HygienicMaterialsVO;
import com.CST.vo.cb.InComeSourceUnLinkVO;
import com.CST.vo.cb.InSourceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EtlAccvouchMapper extends BaseMapper<EtlAccvouch> {
    List<InSourceVO> listEtlAccvouchSource(InSourceDTO inSourceDTO);
    
    List<InComeSourceUnLinkVO> getUnlinkAccvouchWithBill(InSourceDTO inSourceDTO);

    //收入数据
    List<EtlAccvouch> getIncomeEtlAccvouchSource(EtlAccvouch entity);

    //成本数据
    List<CostDataInfo> getCostEtlAccvouchSource(EtlAccvouch entity);

    /**
     * 获取非HIS收入明细
     * @param entity
     * @return
     */
    List<InSourceVO> getNoHisSourece(InSourceDTO entity);

    /**
     * 获取His收入明细
     * @param inSourceDTO
     * @return
     */
    List<InSourceVO> getHisSourece(InSourceDTO inSourceDTO);

    List<EtlAccount> getIncome(EtlAccount entity);

    List<HygienicMaterialsVO> getAdvancedMaterials(DateDTO dateDTO);
    List<HygienicMaterialsVO> getAdvancedMaterialsS(DateDTO dateDTO);

    /**
     * 根据传入的时间获取财政补贴收入
     */
    EtlAccvouch listCaiZhenByDate(DateDTO dateDTO);

    /**
     * 根据传入的时间获取未纳入成本项
     */
    CostDataInfo listNoCostItemByDate(DateDTO dateDTO);


    void insertBaseCost(@Param("list") List<EtlAccvouch> insertList1, @Param("year") Integer year);

    void delByOperDtime(DateDTO dateDTO);

    List< EtlAccvouch> listByDate(DateDTO dateDTO);
}
